import request from "@/utils/request";

// 获取用户列表
export const getUserList = (data) => {
  return request.get("/user/list", {
    params: data,
  });
};

// 获取用户详情
export const getUserDetail = (userId) => {
  return request.get(`/user/${userId}`);
};

// 添加用户
export const addUser = (data) => {
  return request.post("/user", data);
};

// 修改用户
export const updateUser = (data) => {
  return request.put(`/user`, data);
};

// 删除用户
export const deleteUser = (userId) => {
  return request.delete(`/user/${userId}`);
};
